#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>

void* my_memcpy(const void* dest, const void* src, size_t sz)
{
	void* ret = dest;
	assert(dest && src);
	while (sz--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}

int main()
{
	char arr1[20] = { 0 };
	char arr2[] = "prosper";
	
	printf("%s", (char*)my_memcpy(arr1, arr2, 8));
	return 0;
}